package org.yaac.client.service;

import java.util.Collection;
import java.util.List;

import org.yaac.shared.crud.MetaNamespace;
import org.yaac.shared.editor.EntityHierarchy;
import org.yaac.shared.editor.EntityInfo;
import org.yaac.shared.editor.EntityUpdateInfo;
import org.yaac.shared.property.KeyInfo;
import org.yaac.shared.property.PropertyInfo;

import com.google.gwt.user.client.rpc.AsyncCallback;

public interface CRUDServiceAsync {

	void loadMetaData(AsyncCallback<List<MetaNamespace>> callback);

	void loadEntityHierarchy(String keyString, AsyncCallback<EntityHierarchy> callback);

	void loadEntities(String kind, String filter, int start, int length, AsyncCallback<List<EntityInfo>> callback);

	void updateEntity(Collection<EntityUpdateInfo> entities, AsyncCallback<Void> callback);

	void parsePropertyExp(String keyString, String exp, List<String> filePaths,
			AsyncCallback<PropertyInfo> callback);

	void delete(KeyInfo keyInfo, AsyncCallback<Void> callback);

	void copyToNew(KeyInfo keyInfo, AsyncCallback<String> callback);

	void create(KeyInfo key, AsyncCallback<Void> callback);

}
